<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改管理员密码</title>
<link rel="stylesheet" type="text/css" href="css/main.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.query.js"></script>
<script type="text/javascript">
function modPass(){
	if ($('#oldpassword').val() == "") {
		$('#hint_old_password').html('*请输入原密码！');
		return false;
	} else {
		$('#hint_old_password').html('');
	}
	if ($('#password').val() == "") {
		$('#hint_password').html('*请输入密码！');
		return false;
	} else {
		$('#hint_password').html('*');
	}
	if ($('#password2').val() != $('#password').val()) {
		$('#hint_password2').html('*两次密码不一致！');
		return false;
	} else {
		$('#hint_password2').html('*');
	}
	$('#myForm').submit();
}
$(document).ready(function(){
	if($.query.get("r")=="e"){
		alert("抱歉，修改失败，请确认原密码正确，并且没有登陆超时！");
		//$('#hint_old_password').html("*原密码错误！");
	}else if($.query.get("r")=="s"){
		alert('修改成功！');
		//$('#hint_old_password').html("修改成功");
	}
});
</script>
</head>
<body style="background-image:url(./images/homelogo.png);background-color:#004350">
	<div style="position: relative; margin-left: 450px; margin-top: 200px; width: 400px">
		<form action="UserAction!changePass.action" method="post"
			name="myForm" id="myForm">
		<p>
			<label>原密码</label> <input type="password" name="user.oldpassword"
				id="oldpassword" /><span
				id="hint_old_password" style="color: red">*</span>
		</p>
		<p>
			<label>新密码</label> <input type="password" name="user.password"
				id="password" /><span id="hint_password" style="color: red">*</span>
		</p>
		<p style="margin-left:-16px;">
			<label>确认密码</label> <input type="password" name="password2"
				id="password2" /><span id="hint_password2" style="color: red">*</span>
		</p>
		<p style="text-align: center; width: 240px;">
				<input type="button" class="button" onclick="modPass();"
					value="修改" /> <input type="button" class="button" value="返回"
					onclick="javascript:location.href='main.html';" />
			</p>
		</form>
	</div>
</body>
</html>